package cn.brilliantfuture.commentry.entity;

// Generated 2012-7-16 16:25:58 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * AdvertPubGroup generated by hbm2java
 */
@Entity
@Table(name = "advert_pub_group", catalog = "cabinet")
public class AdvertPubGroup implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer advertPubGroupId;
	private String advertPubName;
	private UserGroup userGroup;
	private Integer screen;
	private Integer inStyle;
	private Integer inSpeed;
	private Integer outStyle;
	private Integer outSpeed;
	private int stayTime;
	private Date insertTime;
	private int insertUser;
	private boolean deleted;

	private Set<AdvertInfoPubGroup> advertInfoPubGroups = new HashSet<AdvertInfoPubGroup>(0);
	
	private Set<LockersPubGroup> lockersPubGroups = new HashSet<LockersPubGroup>(0);
	
	public AdvertPubGroup() {
	}

	public AdvertPubGroup(Set<LockersPubGroup> lockersPubGroups, Set<AdvertInfoPubGroup> advertInfoPubGroups, String advertPubName, UserGroup userGroup, Integer screen, Integer inStyle, Integer inSpeed, Integer outStyle, Integer outSpeed, int stayTime, Date insertTime, int insertUser, boolean deleted) {
		this.advertPubName = advertPubName;
		this.lockersPubGroups = lockersPubGroups;
		this.advertInfoPubGroups = advertInfoPubGroups;
		this.userGroup = userGroup;
		this.screen = screen;
		this.inStyle = inStyle;
		this.inSpeed = inSpeed;
		this.outStyle = outStyle;
		this.outSpeed = outSpeed;
		this.stayTime = stayTime;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
		this.deleted = deleted;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "advert_pub_group_id", unique = true, nullable = false)
	public Integer getAdvertPubGroupId() {
		return this.advertPubGroupId;
	}

	public void setAdvertPubGroupId(Integer advertPubGroupId) {
		this.advertPubGroupId = advertPubGroupId;
	}

	@Column(name = "advert_pub_name", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getAdvertPubName() {
		return this.advertPubName;
	}

	public void setAdvertPubName(String advertPubName) {
		this.advertPubName = advertPubName;
	}

	@Column(name = "screen", nullable = false)
	public Integer getScreen() {
		return this.screen;
	}

	public void setScreen(Integer screen) {
		this.screen = screen;
	}

	@Column(name = "in_style", nullable = false)
	public Integer getInStyle() {
		return this.inStyle;
	}

	public void setInStyle(Integer inStyle) {
		this.inStyle = inStyle;
	}

	@Column(name = "in_speed", nullable = false)
	public Integer getInSpeed() {
		return this.inSpeed;
	}

	public void setInSpeed(Integer inSpeed) {
		this.inSpeed = inSpeed;
	}

	@Column(name = "out_style", nullable = false)
	public Integer getOutStyle() {
		return this.outStyle;
	}

	public void setOutStyle(Integer outStyle) {
		this.outStyle = outStyle;
	}

	@Column(name = "out_speed", nullable = false)
	public Integer getOutSpeed() {
		return this.outSpeed;
	}

	public void setOutSpeed(Integer outSpeed) {
		this.outSpeed = outSpeed;
	}

	@Column(name = "stay_time", nullable = false)
	public int getStayTime() {
		return this.stayTime;
	}

	public void setStayTime(int stayTime) {
		this.stayTime = stayTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "insert_user", nullable = false)
	public int getInsertUser() {
		return this.insertUser;
	}

	public void setInsertUser(int insertUser) {
		this.insertUser = insertUser;
	}

	@Column(name = "deleted", nullable = false)
	public boolean isDeleted() {
		return this.deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "advertPubGroup")
	public Set<AdvertInfoPubGroup> getAdvertInfoPubGroups() {
		return advertInfoPubGroups;
	}

	public void setAdvertInfoPubGroups(Set<AdvertInfoPubGroup> advertInfoPubGroups) {
		this.advertInfoPubGroups = advertInfoPubGroups;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "advertPubGroup")
	public Set<LockersPubGroup> getLockersPubGroups() {
		return lockersPubGroups;
	}

	public void setLockersPubGroups(Set<LockersPubGroup> lockersPubGroups) {
		this.lockersPubGroups = lockersPubGroups;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "group_id", nullable = false)
	@NotNull
	public UserGroup getUserGroup() {
		return userGroup;
	}

	public void setUserGroup(UserGroup userGroup) {
		this.userGroup = userGroup;
	}

}
